//
   Created by ucai on 2015/11/18 0018.
extends ../layout.jade
block content
   div.container
      div.page-header
         h1 Login
      if errors
         div.alert.alert-danger.text-center
            span #{error}
      if success
         div.alert.alert-success
            span 登录成功！
            div.pull-right
               a(href="/") 返回主页
      else
         form.login-form.form-horizontal(method="POST",action="/users/login",role="form")
            div.form-group
               label.col-sm-4 User Name
               div.col-sm-8
                  input.form-control(
                     placeholder="User Name",
                     required="true",
                     name="userName",
                     type="text",
                     id='name1'
                  )
            div.form-group
               label.col-sm-4 Password
               div.col-sm-8
                  input.form-control(
                     placeholder="Your password",
                     required=true,
                     name="password",
                     type="password",
                     id='pas'
                  )
            div.form-group
               div.col-sm-offset-4.col-sm-8
                  button.login.btn-primary(type="submit",id="login") Login
            div.pull-right
               a(href="/") 返回主页

